package com.example.design.bilibili.singleton;

public class SingletonTest8 {

    public static void main(String[] args) {
        Singleton8 instance1 = Singleton8.INSTANCE;
        Singleton8 instance2 = Singleton8.INSTANCE;
        System.out.println(instance1==instance2);
        instance1.sayOk();
    }
}

enum Singleton8 {

    INSTANCE;

    public void sayOk(){
        System.out.println("ok~");
    }
}
